// Copyright 2012 wstc

#ifndef PLATFORM_BASE_BITMAP_H_
#define PLATFORM_BASE_BITMAP_H_

#include <vector>
#include "base/common.h"

class Bitmap {
  public:
    Bitmap();
    explicit Bitmap(size_t size);
    size_t Resize(size_t size);

    size_t Data_size() {
      return data_size_;
    }
    size_t Size() {
      return size_;
    }
    void SetBit(size_t loc);
    void ClearBit(size_t loc);
    bool TestBit(size_t loc);
    ~Bitmap();
  private:
    void destory();

    typedef long* data_t; // NOLINT 4
    data_t data_;
    size_t size_;
    size_t data_size_;
};

#endif  // PLATFORM_BASE_BITMAP_H_

